home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / crefmon.arc / MONITOR.DOC < prev   
Text File  |  1982-12-04  |  55KB  |  1,971 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.                               Computerenergy's MONITOR
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                                      Version 1.0
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.                                  PROPRIETARY NOTICE
  45.  
  46.  
  47.      MONITOR is a  proprietary  product  developed  by  Richard C.   Bemis  and
  48.      distributed by Computerenergy Corporation, Denver, Colorado.  
  49.  
  50.      Copyright 1982  by Richard  C.  Bemis and Computerenergy Corporation.  All
  51.      rights  reserved except  those expressly  granted to the user within  this
  52.      document.  
  53.  
  54.      Computerenergy Corporation,  PO Box  6267, Denver, CO 80206 (303) 233-9118
  55.      Source: ST6070 
  56.  
  57.  
  58.  
  59.  
  60.                                         - i -
  61.  
  62.                                   TABLE OF CONTENTS
  63.  
  64.      Section                                                               Page
  65.  
  66.  
  67.  
  68.      CHAPTER 1  MONITOR DISTRIBUTION NOTICE ...............................   1
  69.  
  70.      CHAPTER 2  INTRODUCTION AND SETUP ....................................   2
  71.         2.1  Use Restrictions .............................................   2
  72.         2.2  This Document ................................................   2
  73.         2.3  Setup and Use ................................................   2
  74.         2.4  Color Video Board Notes ......................................   3
  75.  
  76.      CHAPTER 3  GENERAL INSTRUCTIONS ......................................   4
  77.         3.1  Program Interface to the Routines ............................   4
  78.         3.2  Returned Data ................................................   5
  79.         3.3  Return Codes .................................................   5
  80.         3.4  Returned Values ..............................................   5
  81.         3.5  Routine Interface Procedure ..................................   5
  82.         3.6  Routine Names ................................................   5
  83.         3.7  Reserved Variables ...........................................   5
  84.  
  85.      CHAPTER 4  ROUTINE SUMMARY - BY NUMBER ...............................   6
  86.  
  87.      CHAPTER 5  ROUTINE SUMMARY - BY TYPE .................................   7
  88.  
  89.      CHAPTER 6  INPUT/OUTPUT ROUTINES .....................................   8
  90.         6.1  No. 1 - Data Entry - ZIN .....................................   8
  91.         6.2  No. 2 - Menu & "Enter Code" - ZMENU ..........................  12
  92.         6.3  No. 3 - Clear Target Area - ZTCLR ............................  14
  93.         6.4  No. 4 - Menu w/Targets for Data - ZTMENU .....................  15
  94.         6.5  No. 5 - Update Menu with Data - ZUPTMENU .....................  17
  95.         6.6  No. 6 - Boxed Title - ZBOX ...................................  18
  96.         6.7  No. 7 - Single-Line Page Heading - ZLINE .....................  19
  97.         6.8  No. 8 - All ok? - ZAOK .......................................  20
  98.  
  99.      CHAPTER 7  EDIT ROUTINES .............................................  21
  100.         7.1  No. 9 - Test for Y or N - ZTESTYN ............................  21
  101.         7.2  No. 10 - Numeric Limit Test - ZNLIMIT ........................  22
  102.  
  103.      CHAPTER 8  OTHER ROUTINES ............................................  23
  104.         8.1  No. 11 - Clear Screen - ZSCREEN ..............................  23
  105.         8.2  No. 12 - Sound Quiet Beep - ZBEEP ............................  23
  106.         8.3  No. 13 - Convert Input to Uppercase - ZUP ....................  23
  107.         8.4  No. 14 - Convert Input to Mixed Case - ZMIX ..................  23
  108.         8.5  No. 15 - End Program - ZEND ..................................  24
  109.         8.6  No. 16 - Print Centered Message - ZCTR .......................  25
  110.         8.7  No. 17 - Print Centered Message - Reverse Video - ZCTRR ......  25
  111.         8.8  No. 18 - Print Centered Message - Blinking - ZCTRB ...........  25
  112.         8.9  No. 19 - Print Centered Message - Underlined - ZCTRU .........  25
  113.  
  114.      CHAPTER 9  ERROR MESSAGES ............................................  26
  115.         9.1  No. 20-26 - Error Messages - ZERRname ........................  26
  116.  
  117.  
  118.  
  119.                                        - ii -
  120.  
  121.                                   TABLE OF CONTENTS
  122.  
  123.      Section                                                               Page
  124.  
  125.  
  126.      CHAPTER 10  MONITOR LINE USAGE MAP/SPECIAL VARIABLES .................  27
  127.         10.1  Monitor Line Number Usage Map ...............................  27
  128.         10.2  Special Variables ...........................................  27
  129.  
  130.      CHAPTER 11  STANDALONE ROUTINES ......................................  28
  131.         11.1  Save Program Routine ........................................  28
  132.         11.2  Program Memory Map ..........................................  28
  133.  
  134.      CHAPTER 12  OTHER INFORMATION ........................................  29
  135.         12.1  Distribution Disk Contents - Monitor ........................  29
  136.         12.2  Disclaimer ..................................................  29
  137.  
  138.      CHAPTER 13  SUGGESTIONS, FEEDBACK, AND BUG REPORTS ...................  30
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.      Monitor                          - iii -        Computerenergy Corporation
  179.  
  180.                                       CHAPTER 1
  181.  
  182.                              MONITOR DISTRIBUTION NOTICE
  183.  
  184.      Monitor is being  distributed using the "Freeware"* approach.  To those of
  185.      you  unfamiliar  with  this approach,  it works  like  this.  You may send
  186.      either a preformatted single-sided disk (or a prepaid contribution for our
  187.      disk  and mailer)  to us  with a prepaid return mailer  and we will send a
  188.      complete copy  of the  product.  If the product does  not meet your needs,
  189.      please pay  nothing.  If the product does meet your needs, and you can use
  190.      it, then  we  would  appreciate  a  contribution of  whatever  you feel is
  191.      appropriate.   Naturally,  we have  probably given  you  a clue in several
  192.      places  as  to  what  is  our  "completely  unprejudiced  opinion"  of  an
  193.      appropriate  contribution amount.   Contributions are completely voluntary
  194.      and much encouraged.  
  195.  
  196.      Even if you do  not contribute, you are encouraged  to copy and distribute
  197.      the product freely subject to the following restrictions: 
  198.  
  199.           1. Do  not  distribute altered  copies.  Note:  You  may distribute a
  200.              separate  set of  modifications to  merge in if you wish  but they
  201.              must be clearly identified as not originating from Computerenergy.
  202.              If  you do  make modifications,  we would like to see  what you've
  203.              done, if possible, for future versions.  
  204.  
  205.           2. The product is to be distributed as a complete "distribution copy"
  206.              produced by  the copy  utility provided with the product  for this
  207.              purpose.  
  208.  
  209.           3. No fee  is to  be charged for copying or  distributing the program
  210.              without   an   express   written  agreement   with  Computerenergy
  211.              Corporation.  
  212.  
  213.           4. Commercial sale  of  this  product  in  any manner  is  prohibited
  214.              without  Computerenergy's written  permission.  Some products will
  215.              be released with this permission automatically given and expressly
  216.              stated.  
  217.  
  218.      User Groups/Clubs:  Computerenergy's freeware  products may be distributed
  219.      by Clubs and  User Groups subject to the  same restrictions.  We would ask
  220.      only that contributions  to our continuing efforts be  encouraged by those
  221.      performing such distribution.  
  222.  
  223.      Computer Bulletin  Boards:   Computerenergy's  freeware  products  may  be
  224.      distributed  by BBS's  subject to  the  same restrictions and contribution
  225.      encouragement.  However, as  the products tend to be  large and consist of
  226.      several files, we have some concern as to the reliability of transmissions
  227.      and  length of  connect time.   Perhaps disks could be mailed  or just the
  228.      documentation placed on the board for browsers.  
  229.  
  230.  
  231.      * The Freeware  concept was  initially developed by Andrew Fluegelman  and
  232.      the  term  "FREEWARE"  is a  trademark of  The  Headlands Press, Inc.  The
  233.      Headlands Press  provides a catalog of information about Freeware products
  234.      available  from multiple  sources.  They  may be contacted at PO  Box 862,
  235.      Tiburon, CA 94920 or Source: TCP204 or Compuserve: 71435,1235.  
  236.  
  237.      Monitor                           - 1 -         Computerenergy Corporation
  238.  
  239.                                       CHAPTER 2
  240.  
  241.                                INTRODUCTION AND SETUP
  242.  
  243.  
  244.      Computerenergy's Monitor is a series of routines that provide a consistant
  245.      user  interface  for  application  development.   It  helps  minimize  the
  246.      drudgery of  screen development, menus, titles, prompts, and editing input
  247.      as  the  user  interacts with  your application.   Monitor's  routines are
  248.      designed to be incorporated as a "front end" into application programs and
  249.      were created to make custom application development easier.  
  250.  
  251.      Monitor has been  developed in various forms for a number of microcomputer
  252.      basics  over  the past  several  years.   It  has  been used  for  serious
  253.      application development for all of that time by a number of developers and
  254.      now represents our consensus of the best standard set of useful routines. 
  255.  
  256.      However, we have  noticed that each developer has his own biases as to how
  257.      things should  be accomplished and variations to Monitor frequently occur.
  258.      You are  encouraged to alter Monitor in any way for your own use.  What is
  259.      important is that you use or develop a standard set of routines so that as
  260.      you develop  applications,  there  is  a  consistant user  appearance  and
  261.      function.  
  262.  
  263.      2.1  Use Restrictions
  264.  
  265.           There are no restrictions  on the incorporation of Monitor  or any of
  266.           its  routines into  any application  system or program.  There is  no
  267.           royalty or notice  required of the source of  the routines.  The sole
  268.           restriction is  that  the  Monitor  is  subject to  the  distribution
  269.           requirements stated in the Distribution Notice when it is distributed
  270.           as Monitor itself.  
  271.  
  272.      2.2  This Document
  273.  
  274.           This document  is   organized  by  routine  with  detailed  reference
  275.           information on  each routine  in a separate section.  Several  screen
  276.           images  have been  included as  examples and are at the  beginning of
  277.           their sections between  lines of equal signs.  In  addition, there is
  278.           routine  summary  information which  you may  wish  to copy for quick
  279.           reference.  
  280.  
  281.      2.3  Setup and Use
  282.  
  283.           At first blush,  the Monitor  routines may appear complex and  overly
  284.           large.  However, we ask that you be patient and try incorporating the
  285.           routines as  a front  end to some of the  programs you develop.  With
  286.           use, the  routines and their structures will become second nature and
  287.           you  will  be  able to  develop code  faster  with substantially more
  288.           function and a consistant user interface.  
  289.  
  290.           We would  also  recommend  that  you  run  the  Monitor  through  our
  291.           Expanding Lister (if it is available) in order to better see what the
  292.           code  is  doing.   The Lister  should print  around  16 pages for the
  293.           Monitor.  File  this copy for later reference.  When you subsequently
  294.           use  the Lister  on a  program incorporating the Monitor, start  with
  295.  
  296.      Monitor                           - 2 -         Computerenergy Corporation
  297.  
  298.                                               CHAPTER 2: INTRODUCTION AND SETUP
  299.  
  300.  
  301.           line 10000 as it will save reprinting those 16 pages.  
  302.  
  303.           Before proceeding, it  is  highly  recommended  that  a copy  of  the
  304.           distribution  disk  be  made immediately  for your  use  and that the
  305.           original distribution disk be filed in a safe place.  
  306.  
  307.           The Monitor is  supplied in  Basic encoded source (.BAS) that  can be
  308.           loaded into into Basic when entering entire programs.  It may also be
  309.           convenient to  save a  version in ASCII (.S) form  that can be merged
  310.           with any application program.  
  311.  
  312.           Monitor also contains  a significant number of single-line REMarks to
  313.           aid in modification - these may be removed to save space if required.
  314.  
  315.           Some routines may not apply for a given program and may be deleted to
  316.           save space.   Shorter versions of Monitor that eliminate the targeted
  317.           menus and some of the lesser used error messages are common.  
  318.  
  319.           Monitor routines may be operated and tested in an interactive mode by
  320.           entering the  routine-calling code  after line number 10000 and  then
  321.           "running"  Monitor.  We  suggest you  give them a try as  you proceed
  322.           through this document.  
  323.  
  324.      2.4  Color Video Board Notes
  325.  
  326.  
  327.           If you are  going to  be using the Color Video  Interface rather than
  328.           the Monochrome  (green) interface, you will need to change 2 lines of
  329.           code in the Monitor as otherwise the cursor will seem to disappear.  
  330.  
  331.                Change line 1155:
  332.                          from:  1155 ZINS%=1:LOCATE ,,,4,12:RETURN
  333.                            to:  1155 ZINS%=1:LOCATE ,,,0,7:RETURN
  334.  
  335.                Change line 1165:
  336.                          from:  1165 ZINS%=0:LOCATE ,,,11,12:RETURN
  337.                            to:  1165 ZINS%=0:LOCATE ,,,6,7:RETURN
  338.  
  339.           We will add some code to make this automatic at a later time.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.      Monitor                           - 3 -         Computerenergy Corporation
  356.  
  357.                                       CHAPTER 3
  358.  
  359.                                 GENERAL INSTRUCTIONS
  360.  
  361.  
  362.      Video-based computer systems  have the  advantage of very quick and  quiet
  363.      response to a user.  This allows the user to interact with the computer at
  364.      basically  their own  speed.  Applications  can and should be designed  to
  365.      take advantage of these characteristics.  
  366.  
  367.      The Monitor is a series of CRT-oriented routines that provide a convenient
  368.      base for application  development.  Routines are supplied for  many of the
  369.      most common operations in the following areas: 
  370.  
  371.                               Input
  372.                               CRT Output
  373.                               Data Editing
  374.                               CRT Management
  375.                               Error Messages
  376.                               End Program - Common Exit
  377.  
  378.      Monitor is designed  to be  incorporated as a front-end into  each program
  379.      that  requests  input  from a  user.  The  application  program is usually
  380.      constructed  by  using BASIC  to  call  in  a  copy of  Monitor  (via LOAD
  381.      "MONITOR" or LOAD "MONITOR.S") and performing the following steps: 
  382.  
  383.           1. Modify the REM at statement 10 to reflect the application
  384.                program name.
  385.           2. Place the application's title in the ZTITLE$= statement
  386.           3. Modify the END at statement 25 to link to another program
  387.                if necessary
  388.           4. Enter the application's code (via Basic) beginning at the supplied
  389.                statement: 10000 REM Begin Program Here
  390.           5. Save the program with a NEW NAME
  391.  
  392.  
  393.      Notes: Some  functions  use  graphic  characters  that are  not reproduced
  394.      exactly in this manual.  
  395.  
  396.      The "ENTER" key is the large key with a "down and left" arrow on it to the
  397.      right  of  the keyboard.   This key  will be referred to as  the ENTER key
  398.      within this manual.  
  399.  
  400.      3.1  Program Interface to the Routines
  401.  
  402.           The program  interface  is  similar  for  all the  routines.  Several
  403.           variables may be loaded with information to be passed to the routine,
  404.           and the  routine is  then called by setting Z=  to the routine number
  405.           and executing a GOSUB 100.  
  406.  
  407.           Example:
  408.  
  409.               10010 Z$="Information to be passed to the routine":Z=1:GOSUB 100
  410.  
  411.  
  412.           The most  common  calling  procedure is  to first  load  any required
  413.  
  414.      Monitor                           - 4 -         Computerenergy Corporation
  415.  
  416.                                                 CHAPTER 3: GENERAL INSTRUCTIONS
  417.  
  418.  
  419.           variables (usually  Z$), set Z= to the routine number, and then issue
  420.           a GOSUB 100.   Most of the time this  can be accomplished on a single
  421.           line.  
  422.  
  423.      3.2  Returned Data
  424.  
  425.           Data, if any, is returned from a routine in two variables: 
  426.  
  427.                     ZD$ = Any alphanumeric data
  428.                     ZN  = Any numeric data
  429.  
  430.  
  431.      3.3  Return Codes
  432.  
  433.           Return codes  from  a  routine  (if  any)  are  provided  in the  ZR%
  434.           variable.   They   are  designed  to  communicate  the  occurance  of
  435.           different classes  of  events  to  the  programmer who  is  using the
  436.           routine.  He may then take any appropriate action he deems necessary.
  437.  
  438.  
  439.      3.4  Returned Values
  440.  
  441.           Returned Values (if  any) are returned in the ZV% variable.  Examples
  442.           of returned values can be seen in ZTESTYN and ZAOK below.  
  443.  
  444.  
  445.      3.5  Routine Interface Procedure
  446.  
  447.           To have  your   program  utilize  any  routine,  simply  follow  this
  448.           procedure: 
  449.  
  450.                1.  Load Z-prefix variables as directed in the Routine's
  451.                      format (usually Z$).
  452.                2.  Set Z equal to the Routine's Number.
  453.                3.  Execute a GOSUB 100
  454.                4.  Test Return code with "ON ZR% GOTO ...." as appropriate.
  455.                5.  Take action for each Return Code and/or Returned Value.
  456.                6.  Save returned values of ZD$ or ZN in user variables
  457.                    if appropriate.
  458.  
  459.           Many Routines will not require all of the above steps.  
  460.  
  461.      3.6  Routine Names
  462.  
  463.           For ease of communication, each Monitor Routine has been given a name
  464.           which begins with Z as a prefix.  
  465.  
  466.      3.7  Reserved Variables
  467.  
  468.           The Monitor  uses  variables that  begin with  a  "Z".  All Variables
  469.           beginning with  Z should  be reserved for use by  the Monitor and not
  470.           used within the application program.  
  471.  
  472.  
  473.      Monitor                           - 5 -         Computerenergy Corporation
  474.  
  475.                                       CHAPTER 4
  476.  
  477.                              ROUTINE SUMMARY - BY NUMBER
  478.  
  479.                                Monitor Quick Reference
  480.  
  481.       1   ZIN - Standard Input Routine                        
  482.       2   ZMENU - Menu and 'Enter Selection'
  483.       3   ZTCLR - Clear Target Data Fields
  484.       4   ZTMENU - Display Targeted Menu
  485.       5   ZUPTMENU - Update Targeted Menu
  486.       6   ZBOX - Boxed Title
  487.       7   ZLINE - Single Line Title
  488.       8   ZAOK - All ok?
  489.       9   ZTESTYN - Test for Y or N
  490.      10   ZNLIMIT - Numeric Limit Test
  491.      11   ZSCREEN - Erase to end of screen
  492.      12   ZBEEP - Sound Beep
  493.      13   ZUP - Convert to Uppercase
  494.      14   ZMIX - Return to Mixed Case Input
  495.      15   ZEND - Terminate Program
  496.      16   ZCTR - Center Message
  497.      17   ZCTRR - Center Mesage in Reverse Video
  498.      18   ZCTRB - Center Message - Blinking
  499.      19   ZCTRU - Center Message - Underlined
  500.      20   ZERRINV - Error Message - Invalid
  501.      21   ZERRINT - Error Message - Not Integer
  502.      22   ZERRNUM - Error Message - Not Numeric
  503.      23   ZERRCTRL - Error Message - Invalid Function
  504.      24   ZERRBACK - Error Message - Invalid Backup
  505.      25   ZERRENT - Error Message - ENTER Only
  506.      26   ZERRHELP - Error Message - Help Unavailable
  507.      29   ZDELAY - Time Delay
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      Monitor                           - 6 -         Computerenergy Corporation
  533.  
  534.                                       CHAPTER 5
  535.  
  536.                               ROUTINE SUMMARY - BY TYPE
  537.  
  538.      Input/Output Routines:
  539.  
  540.           1 - ZIN      = Data Entry
  541.           2 - ZMENU    = Menu & "Enter Code"
  542.           3 - ZTCLR    = Clear Target Data Fields
  543.           4 - ZTMENU   = Menu with Targets for Data
  544.           5 - ZUPTMENU = Update Menu with Data
  545.           6 - ZBOX     = Boxed Title
  546.           7 - ZLINE    = Single-line Page Heading
  547.           8 - ZAOK     = All ok? Y or N
  548.          16 - ZCTR     = Print Centered Message
  549.          17 - ZCTRR    = Print Centered Message - reverse video
  550.          18 - ZCTRB    = Print Centered Message - blinking
  551.          19 - ZCTRU    = Print Centered Message - underlined
  552.  
  553.      Edit Routines:
  554.  
  555.            9 - ZTESTYN = Test for Y or N
  556.           10 - ZNLIMIT = Numeric Limits Test
  557.  
  558.      Other Routines:
  559.  
  560.           11 - ZSCREEN = Clear Screen
  561.           12 - ZBEEP   = Sound Beep (quiet)
  562.           13 - ZUP     = Convert Input to Uppercase
  563.           14 - ZMIX    = Convert Input to Mixed Case
  564.           29 - ZDELAY  = Time Delay
  565.  
  566.      Error Message Routines:
  567.  
  568.  
  569.           20 - ZERRINV  = "Is Invalid"
  570.           21 - ZERRINT  = "Is Not Integer"
  571.           22 - ZERRNUM  = "Is Not Numeric"
  572.           23 - ZERRCTRL = "Funvtion Key = nn Not Available at this Point"
  573.           24 - ZERRBACK = "Backup Entry Not Available at this Point"
  574.           25 - ZERRENT  = "ENTER-only Entry Not Available at this Point"
  575.           26 - ZERRHELP = "Help Not Available at this Point"
  576.  
  577.      End Program Routine:
  578.  
  579.           15 - ZEND    = End Program
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.      Monitor                           - 7 -         Computerenergy Corporation
  592.  
  593.                                       CHAPTER 6
  594.  
  595.                                 INPUT/OUTPUT ROUTINES
  596.  
  597.      6.1  No. 1 - Data Entry - ZIN
  598.  
  599.      ==========================================================================
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.      Prompt Message for Entry [...............]
  624.  
  625.      ==========================================================================
  626.  
  627.      ZIN provides a  general purpose  data entry capability and is  the bedrock
  628.      routine  in the  Monitor.  A  prompt message and a variable-length  target
  629.      consisting of periods  surrounded by brackets are displayed  at the bottom
  630.      left-hand  corner of  the screen  on the 23rd line.  Rudimentary  editing,
  631.      "backup to  previous entry",  and function-key options are also  provided.
  632.      Editing commands  within the  field during entry are also  supported.  The
  633.      user can not enter data outside the target, and will hear a gentle buzz if
  634.      he attempts to do so.  
  635.  
  636.      FORMAT:
  637.  
  638.           Z$ = "Prompt Message for Entry,n1,n2" : Z=1 : GOSUB 100
  639.  
  640.                n1 = Length of target field
  641.                n2 = Type of entry edit:
  642.  
  643.                     1 = Alphanumeric
  644.                     2 = Integer only
  645.                     3 = Numeric
  646.  
  647.      Note: Commas are  used as information separators, and  may not be included
  648.      in the prompt message.  
  649.  
  650.      Monitor                           - 8 -         Computerenergy Corporation
  651.  
  652.                                                CHAPTER 6: INPUT/OUTPUT ROUTINES
  653.  
  654.  
  655.      EDITS PERFORMED:
  656.  
  657.           Type 1 (Alphanumeric):
  658.  
  659.                No editing performed.  All data is accepted as valid.
  660.  
  661.           Type 2 (Integer):
  662.  
  663.                Numeric integers only  accepted as valid.  Upon non-integer data
  664.                (ddd)  being  entered,  the  message  "ddd  Is  Not Integer"  is
  665.                displayed below the  entry line in reverse video  and the prompt
  666.                is redisplayed.  
  667.  
  668.           Type 3 (Numeric): 
  669.  
  670.                Numbers which may  be decimal, integer, and positive or negative
  671.                may be  entered.   Upon  alpha  data  (aaa) being  entered,  the
  672.                message "aaa Is  Not Numeric" is displayed below  the entry line
  673.                in reverse video and the prompt is then redisplayed.  
  674.  
  675.      RETURNS: 
  676.  
  677.           Data is contained in:
  678.  
  679.                ZD$ for Alphanumeric      (Note: string eqs. for ZN also ret'd h
  680.                ZN for Integer or Numeric
  681.  
  682.           Function-Key Number is contained in ZN if Function or Ctrl Keys were 
  683.  
  684.           Return Code in ZR%:
  685.  
  686.                ZR% = 1 = Normal entry
  687.                      2 = Up-Arrow entered or Plus entered as first character
  688.                              - Field Backup character
  689.                      3 = ENTER key was entered as first char.
  690.                      4 = Function Key or Control key was entered
  691.                      5 = Help requested
  692.  
  693.           When ZR% =  2 or 3 then ZD$ is blanked and ZN is zeroed.  This allows
  694.           an ENTER-only  response  to  be  used  to blank  out  entries without
  695.           further code.  
  696.  
  697.      EXAMPLES:
  698.  
  699.           Alphanumeric;
  700.  
  701.                10000 Z$ = "Entry Prompt,10,1" : Z=1 : GOSUB 100
  702.                10010 ON ZR% GOTO 10020,10030,10040,10050,10060
  703.                10020 PRINT "Normal Entry" : STOP
  704.                10030 PRINT "Backup Character" : STOP
  705.                10040 PRINT "ENTER Key" : STOP
  706.                10050 PRINT "Function Key" : STOP
  707.                10060 PRINT "Help Requested" : STOP
  708.  
  709.      Monitor                           - 9 -         Computerenergy Corporation
  710.  
  711.                                                CHAPTER 6: INPUT/OUTPUT ROUTINES
  712.  
  713.  
  714.  
  715.           You may also  prevent the  user from using any of  the entry types by
  716.           merely branching  back to the prompting line with the ZR% branch.  No
  717.           error message  will be displayed.  If you wish an error message to be
  718.           displayed,  set Z  and GOSUB  100 to display the appropriate  message
  719.           (see Error Messages below) before taking the branch.  
  720.  
  721.           Example: Prohibit Backup, ENTER Key, Function Key, and Help Entry 
  722.  
  723.                     10000 Z$ = "Entry Prompt,10,1" : Z=1 : GOSUB 100
  724.                     10010 ON ZR% GOTO 10020, 10000, 10000, 10000, 10000
  725.                     10020 PRINT "Valid Data" : STOP
  726.  
  727.           By branching  to  10000, the  user is  forced to try another type  of
  728.           entry to continue processing.  
  729.  
  730.  
  731.           Function Keys: 
  732.  
  733.                Special functions may be  entered by pressing the F1  - F10 keys
  734.                or  holding down  the CTRL  key and then pressing a  letter key.
  735.                These entries (referred  to as "Functions") are trapped  by ZIN.
  736.                The corresponding number of the key pressed (A=1, B=2, C=3, etc.
  737.                and F1 - F10 = 59-68) is returned in ZN.  ZD$ is blanked.  
  738.  
  739.                Function Key Use: 
  740.  
  741.  
  742.                Example:
  743.  
  744.                          10000 Z$ = "Enter Data,10,1" : Z=1 : GOSUB 100
  745.                          10010 ON ZR% GOTO 10020, 10030, 10040, 10050, 10000
  746.                          10020 ... Normal Entry
  747.                          10030 ... Backup Character
  748.                          10040 ... ENTER Key
  749.                          10050 IF ZN > 3 THEN 10060 ELSE 10070
  750.                                    : REM Test for allowed range
  751.  
  752.                          10060 Z=23 : GOSUB 100 : GOTO 10000
  753.                                    : REM Process Range Error
  754.  
  755.                          10070 ON ZN GOTO 11000,11010,11020
  756.                          10080 STOP
  757.  
  758.                          11000 PRINT "CTRL-A was entered" : STOP
  759.                          11010 PRINT "CTRL-B was entered" : STOP
  760.                          11020 PRINT "CTRL-C was entered" : STOP
  761.  
  762.      INNER-FIELD EDITS:
  763.  
  764.           Left Arrow:    Cursor Left - non-destructive
  765.           Right Arrow:   Cursor Right - non-destructive
  766.           Backspace:     case 1: at end of field - erases 1 character
  767.  
  768.      Monitor                           - 10 -        Computerenergy Corporation
  769.  
  770.                                                CHAPTER 6: INPUT/OUTPUT ROUTINES
  771.  
  772.  
  773.                          case 2: in middle of field - deletes character at curs
  774.           Backtab:       Cursor positioned to beginning of field
  775.           Forward Tab:   Cursor positioned to end of entered characters
  776.           INS:           Inserts blank at cursor
  777.           DEL:           Deletes character at cursor
  778.           ESC:           Erases input and restores target
  779.           Ctrl-END:      Erase from cursor to end of field
  780.  
  781.  
  782.      SPECIAL CHARACTERS:
  783.  
  784.           Up-arrow or +:      Field Backup (ENTER not required)
  785.  
  786.           ? in 1st character: Help requested (sets ZR% to 5)
  787.  
  788.           END:                If pressed twice in succession, will end program 
  789.                                   a warning message is displayed between END's
  790.  
  791.  
  792.      SPECIAL FUNCTIONS:
  793.  
  794.           Data Preloading:
  795.  
  796.                A target may be  partially or fully preloaded with  data for use
  797.                with  ZIN.  Data  may be  then  manipulated with the inner-field
  798.                edit  keys or  erased  with  ESC.   The  field to  be  loaded to
  799.                activate the preload is ZPL$.  
  800.  
  801.                ZPL$ is cleared to null after each execution of ZIN.  
  802.  
  803.      Enable/Disable Help function: 
  804.  
  805.           The Help function  may be turned on or off with ZHELPSW% at any time.
  806.           If the  Help function  is turned off, the 5th  ZR% branch need not be
  807.           specified.  
  808.  
  809.           Set ZHELPSW% =  0 to turn off.  Monitor initializes the ZHELPSW% to 1
  810.           (on) in statement 30.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.      Monitor                           - 11 -        Computerenergy Corporation
  828.  
  829.                                                CHAPTER 6: INPUT/OUTPUT ROUTINES
  830.  
  831.  
  832.      6.2  No. 2 - Menu & "Enter Code" - ZMENU
  833.  
  834.  
  835.      ==========================================================================
  836.      Example Title                                                    10/01/82
  837.  
  838.  
  839.  
  840.  
  841.  
  842.           1 - Message for Selection 1
  843.           2 - Message for Selection 2
  844.           3 - Message for Selection 3
  845.           4 - Message for Selection 4
  846.           5 - Message for Selection 5
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.             Enter Selection [.]
  860.  
  861.  
  862.      ==========================================================================
  863.  
  864.      ZMENU provides a  menu-list display of a series of numbered options and an
  865.      "Enter Selection"  prompt.  Standard editing for Integer-only, Up-Arrow or
  866.      Plus-sign,   ENTER  Key,   Function  Key,   or   Help  key  is  performed.
  867.      Range-checking for valid selection entries is automatically provided.  
  868.  
  869.      FORMAT:
  870.  
  871.           Z$ = "n1, n2, Message-1, ...,Message-n," : Z=2 : GOSUB 100
  872.  
  873.                (Notes: Trailing comma after last message is required.
  874.                        Commas are used as separators and may not be included
  875.                          in the message.)
  876.                n1 = Row to begin menu
  877.                n2 = Column to begin menu
  878.  
  879.  
  880.      LIMITATIONS:  The maximum number of menu entries is 15.
  881.  
  882.  
  883.  
  884.  
  885.  
  886.      Monitor                           - 12 -        Computerenergy Corporation
  887.  
  888.                                                CHAPTER 6: INPUT/OUTPUT ROUTINES
  889.  
  890.  
  891.      RETURNS:
  892.  
  893.           The Selection number is returned in ZN.  ZN is set to 0 if ZR% is not
  894.           equal 1 (= Normal Entry) 
  895.  
  896.           Return Code in ZR%: 
  897.  
  898.                     ZR% = 1 = Normal Entry
  899.                           2 = Up-Arrow entered or Plus entered as first
  900.                                character - Backup character
  901.                           3 = ENTER Key was entered as first character.
  902.                           4 = Function Key was entered.
  903.                           5 = Help - "?" entered as first character
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.      Monitor                           - 13 -        Computerenergy Corporation
  946.  
  947.                                                CHAPTER 6: INPUT/OUTPUT ROUTINES
  948.  
  949.  
  950.      6.3  No. 3 - Clear Target Area - ZTCLR
  951.  
  952.  
  953.           ZTCLR clears   all   target  area   data  fields  (ZMENU$(1)  through
  954.           ZMENU$(15)) used  in ZTMENU and ZUPTMENU.  Each field is cleared with
  955.           a null (="").  
  956.  
  957.           FORMAT: 
  958.  
  959.                Z=3 : GOSUB 100
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.      Monitor                           - 14 -        Computerenergy Corporation
  1005.  
  1006.                                                CHAPTER 6: INPUT/OUTPUT ROUTINES
  1007.  
  1008.  
  1009.      6.4  No. 4 - Menu w/Targets for Data - ZTMENU
  1010.  
  1011.  
  1012.  
  1013.      ==========================================================================
  1014.      Example Title                                                    10/01/82
  1015.  
  1016.  
  1017.       1. Prompt for Field 1                                        [.......]
  1018.       2. Prompt for Field 2                                 [..............]
  1019.       3. Prompt for Field 3                                             [..]
  1020.       4. Prompt for Field 4                    [...........................]
  1021.       5. Prompt for Field 5                               [................]
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.      ==========================================================================
  1038.  
  1039.  
  1040.      ZTMENU displays  a menu  with prompts  on the left side and  corresponding
  1041.      data   field   targets  for   entry  on   the   right.   The  approach  is
  1042.      fill-in-the-blanks with a  common entry point at the  bottom of the screen
  1043.      for each field  in turn using ZIN.  The  total centered width used for the
  1044.      display may be varied.  
  1045.  
  1046.      SET:
  1047.  
  1048.           Target data  fields  are  contained in  ZMENU$(1) through ZMENU$(15).
  1049.           These fields should be either cleared with ZTCLR or loaded with data.
  1050.           Fields which  contain data  will display the data.  Fields  which are
  1051.           empty (= "", or Null) will display targets.  
  1052.  
  1053.                ZROW% = 1st line available for menu.
  1054.                ZW%   = Width of display.
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.      Monitor                           - 15 -        Computerenergy Corporation
  1064.  
  1065.                                                CHAPTER 6: INPUT/OUTPUT ROUTINES
  1066.  
  1067.  
  1068.      FORMAT:
  1069.  
  1070.           Z$ = "Prompt-n1,n1, ....Prompt-n15,n15," : Z=4 : GOSUB 100
  1071.  
  1072.                (Note: Trailing comma after last prompt is required.)
  1073.  
  1074.                Prompt-n1 - Prompt-n15 = Message for prompt
  1075.                n1 - n15   = Length of target data field
  1076.  
  1077.      LIMITATION:
  1078.  
  1079.           Maximum number of items = 15
  1080.  
  1081.  
  1082.      FUNCTION SUMMARY: 
  1083.  
  1084.           ZTMENU is used  in  conjunction  with  ZTCLR,  ZIN, and  ZUPTMENU  to
  1085.           provide a complete  set of consistant data entry  routines.  ZTMENU's
  1086.           function  is  to display  the entire  entry screen which is used  for
  1087.           feedback to  the  user.   Each  field  in turn  is  then prompted and
  1088.           entered  with  ZIN on  line 23.   As each field is properly  entered,
  1089.           ZUPTMENU is  used to display the field in the ZTMENU area.  After all
  1090.           fields have been entered and processed, ZTCLR clears the ZTMENU entry
  1091.           fields for the next set of entries.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.      Monitor                           - 16 -        Computerenergy Corporation
  1123.  
  1124.                                                CHAPTER 6: INPUT/OUTPUT ROUTINES
  1125.  
  1126.  
  1127.      6.5  No. 5 - Update Menu with Data - ZUPTMENU
  1128.  
  1129.  
  1130.  
  1131.      ==========================================================================
  1132.      Example Title                                                    10/10/82
  1133.  
  1134.  
  1135.       1. Prompt for Field 1                                             100
  1136.       2. Prompt for Field 2                                  [.............]
  1137.       3. Prompt for Field 3                                            [...]
  1138.       4. Prompt for Field 4                      [.........................]
  1139.       5. Prompt for Field 5                                  [.............]
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.      ==========================================================================
  1156.  
  1157.  
  1158.  
  1159.  
  1160.      ZUPTMENU updates a line  in a targeted menu (see  ZTMENU) with data (as in
  1161.      Line No.   1 above).  The data is displayed right-justified, replacing the
  1162.      target field.  
  1163.  
  1164.      SET:
  1165.  
  1166.           ZY%    = n1  = Number of Variable (1 - 15)
  1167.           ZROW%  = n2  = Display 1st line no. on this line
  1168.                             (usually set in ZTMENU)
  1169.           ZN or ZD$    = Data to be displayed
  1170.  
  1171.      FORMAT:
  1172.  
  1173.           ZY% = n1 : ZROW% = n2 : ZN = Data or ZD$ = Data : Z=5 : GOSUB 100
  1174.  
  1175.              Note:  Data  to  be  displayed is  contained in  ZD$  or ZN.  This
  1176.                     routine  will  automatically load  the ZMENU$(ZY%) variable
  1177.                     from ZD$.  
  1178.  
  1179.  
  1180.  
  1181.      Monitor                           - 17 -        Computerenergy Corporation
  1182.  
  1183.                                                CHAPTER 6: INPUT/OUTPUT ROUTINES
  1184.  
  1185.  
  1186.      6.6  No. 6 - Boxed Title - ZBOX
  1187.  
  1188.  
  1189.      ==========================================================================
  1190.      --------------------------------------------------------------------------
  1191.      |   ------------------------------------------------------------------   |
  1192.      |   |                      Example Boxed Title                       |   |
  1193.      |   ------------------------------------------------------------------   |
  1194.      --------------------------------------------------------------------------
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213.  
  1214.      ==========================================================================
  1215.  
  1216.  
  1217.  
  1218.  
  1219.      ZBOX displays a  title within  a box as a convenient  method of program or
  1220.      section identification.  It also may be used to highlight a message.  
  1221.  
  1222.  
  1223.      FORMAT:
  1224.  
  1225.           Z$ = "Title/Message to be displayed" : Z=6 : GOSUB 100
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.      Monitor                           - 18 -        Computerenergy Corporation
  1241.  
  1242.                                                CHAPTER 6: INPUT/OUTPUT ROUTINES
  1243.  
  1244.  
  1245.      6.7  No. 7 - Single-Line Page Heading - ZLINE
  1246.  
  1247.  
  1248.      ==========================================================================
  1249.      Example Title                                                    10/01/82
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263.  
  1264.  
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.      ==========================================================================
  1274.  
  1275.  
  1276.      ZLINE provides a  compact method of titling a screen with the program name
  1277.      and  current  date.   On  the  Monochrome  interface,  the  title will  be
  1278.      underlined.  
  1279.  
  1280.      SET:
  1281.  
  1282.           ZTITLE$ = "Title to be displayed"
  1283.  
  1284.      FORMAT:
  1285.  
  1286.           Z=7 : GOSUB 100
  1287.  
  1288.      OUTPUT:
  1289.  
  1290.      Title to be Displayed                                            10/01/82
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.      Monitor                           - 19 -        Computerenergy Corporation
  1300.  
  1301.                                                CHAPTER 6: INPUT/OUTPUT ROUTINES
  1302.  
  1303.  
  1304.      6.8  No. 8 - All ok? - ZAOK
  1305.  
  1306.  
  1307.      ==========================================================================
  1308.      Example Title                                                     9/10/82
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.      All ok? Y or N [.]
  1330.  
  1331.  
  1332.      ==========================================================================
  1333.  
  1334.      ZAOK provides  a convenient  method  of  asking  for  an "All  ok?"  after
  1335.      feedback to  the user.   A typical example would be  after a review of all
  1336.      data entered  into a record up to that point.  Either Upper or Lowercase Y
  1337.      or N is accepted.  
  1338.  
  1339.  
  1340.      FORMAT:
  1341.  
  1342.           Z=8 : GOSUB 100
  1343.  
  1344.  
  1345.      RETURNS:
  1346.  
  1347.           ZR% = 1 = Data was entered
  1348.                 2 = Backup Character was entered
  1349.                 3 = ENTER Key only was entered
  1350.                 4 = Function key was entered
  1351.                 5 = Help key was entered
  1352.  
  1353.           ZV% = 1 = "Y" or "y" was entered
  1354.                 2 = "N" or "n" was entered
  1355.                 3 = something else was entered - usually an error
  1356.  
  1357.  
  1358.      Monitor                           - 20 -        Computerenergy Corporation
  1359.  
  1360.                                       CHAPTER 7
  1361.  
  1362.                                     EDIT ROUTINES
  1363.  
  1364.      7.1  No. 9 - Test for Y or N - ZTESTYN
  1365.  
  1366.  
  1367.           ZTESTYN tests for  a Y or N user response (either upper or lowercase)
  1368.           to a prompt.  
  1369.  
  1370.           SET:
  1371.  
  1372.                User response in ZD$ (automatic with ZIN and others)
  1373.  
  1374.           FORMAT:
  1375.  
  1376.                Z=9 : GOSUB 100
  1377.  
  1378.           RETURNS:
  1379.  
  1380.                Value returned in ZV%:
  1381.  
  1382.                     ZV% = 1 = "Y" or "y"
  1383.                           2 = "N" or "n"
  1384.                           3 = something else was entered - usually an error
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.      Monitor                           - 21 -        Computerenergy Corporation
  1418.  
  1419.                                                        CHAPTER 7: EDIT ROUTINES
  1420.  
  1421.  
  1422.      7.2  No. 10 - Numeric Limit Test - ZNLIMIT
  1423.  
  1424.  
  1425.           ZNLIMIT tests numeric  fields for values between high and low limits.
  1426.           ZNLIMIT  is usually  used following  a ZIN entry to further  validate
  1427.           numeric data.  
  1428.  
  1429.           SET:
  1430.  
  1431.                ZL = Low  limit
  1432.                ZH = High limit
  1433.                ZN = Data variable to be tested
  1434.  
  1435.           FORMAT:
  1436.  
  1437.                ZL = n1 : ZH = n2 : ZN = Test variable : Z=10 : GOSUB 100
  1438.  
  1439.           RETURNS:
  1440.  
  1441.                Value Returned in ZV%:
  1442.  
  1443.                     ZV% = 1 = Within limits
  1444.                           2 = Too low
  1445.                           3 = Too high
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.      Monitor                           - 22 -        Computerenergy Corporation
  1477.  
  1478.                                       CHAPTER 8
  1479.  
  1480.                                    OTHER ROUTINES
  1481.  
  1482.      8.1  No. 11 - Clear Screen - ZSCREEN
  1483.  
  1484.           ZSCREEN clears  the  screen  from the  specified line  number  to the
  1485.           bottom of the screen and places the cursor to the top blanked line.  
  1486.  
  1487.           SET:
  1488.  
  1489.                Z% = First line to be cleared.
  1490.  
  1491.           FORMAT:
  1492.  
  1493.                Z% = 3 : Z=11 : GOSUB 100
  1494.  
  1495.  
  1496.      8.2  No. 12 - Sound Quiet Beep - ZBEEP
  1497.  
  1498.  
  1499.           ZBEEP provides  a  gentle  sounding warning  buzz as  opposed  to the
  1500.           rather shrill BEEP statement in Basic.  
  1501.  
  1502.           FORMAT:
  1503.  
  1504.                Z=12 : GOSUB 100
  1505.  
  1506.  
  1507.      8.3  No. 13 - Convert Input to Uppercase - ZUP
  1508.  
  1509.           ZUP will convert  all Alpha characters that are being entered via ZIN
  1510.           routines to uppercase  independent of the shift key  on the keyboard.
  1511.           ZUP is particularly handy for Y/N answers and the like.  
  1512.  
  1513.           FORMAT:
  1514.  
  1515.                Z=13 : GOSUB 100
  1516.  
  1517.  
  1518.      8.4  No. 14 - Convert Input to Mixed Case - ZMIX
  1519.  
  1520.           ZMIX will allow  ZIN routines to accept either uppercase or lowercase
  1521.           characters without conversion.  ZMIX is normally used to reset a ZUP.
  1522.  
  1523.           FORMAT:
  1524.  
  1525.                Z=14 : GOSUB 100
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.      Monitor                           - 23 -        Computerenergy Corporation
  1536.  
  1537.                                                       CHAPTER 8: OTHER ROUTINES
  1538.  
  1539.  
  1540.      8.5  No. 15 - End Program - ZEND
  1541.  
  1542.  
  1543.  
  1544.      ==========================================================================
  1545.      --------------------------------------------------------------------------
  1546.      |  --------------------------------------------------------------------  |
  1547.      |  |                       Example Program Title                      |  |
  1548.      |  --------------------------------------------------------------------  |
  1549.      --------------------------------------------------------------------------
  1550.  
  1551.  
  1552.  
  1553.                                  -----------------
  1554.                                  |  End Program  |
  1555.                                  -----------------
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.      ==========================================================================
  1570.  
  1571.  
  1572.  
  1573.  
  1574.      ZEND will produce a  boxed title and an "End  Program" message.  ZEND also
  1575.      provides  a common  ending  point  for  programs  by always  branching  to
  1576.      statement 25.  Should you wish to chain or link to another program instead
  1577.      of ending, modify the END statement at statement 25.  
  1578.  
  1579.  
  1580.      FORMAT:
  1581.  
  1582.           Z=15 : GOSUB 100
  1583.  
  1584.  
  1585.      Note: Make  sure  the  ZTITLE$  variable  still  contains  what  you  want
  1586.      displayed in the large box.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592.  
  1593.  
  1594.      Monitor                           - 24 -        Computerenergy Corporation
  1595.  
  1596.                                                       CHAPTER 8: OTHER ROUTINES
  1597.  
  1598.  
  1599.      8.6  No. 16 - Print Centered Message - ZCTR
  1600.  
  1601.  
  1602.           ZCTR will print  a centered  message on any line on  the screen.  The
  1603.           spaces on the line before and after the message are blanked.  
  1604.  
  1605.           FORMAT: 
  1606.  
  1607.                Z$ = "n1,Message" : Z=16 : GOSUB 100
  1608.  
  1609.                     n1 = Line no. for message
  1610.  
  1611.      8.7  No. 17 - Print Centered Message - Reverse Video - ZCTRR
  1612.  
  1613.  
  1614.           ZCTRR will print a  centered message in reverse video  on any line on
  1615.           the screen.  ZCTRR  is especially useful to highlight  error messages
  1616.           or warnings.  The  Monitor error routines use ZCTRR  on line 24.  The
  1617.           spaces on the line before and after the message are blanked.  
  1618.  
  1619.           FORMAT:
  1620.  
  1621.                Z$ = "n1,Message" : Z = 17 : GOSUB 100
  1622.  
  1623.                     n1 = Line no. for message
  1624.  
  1625.  
  1626.      8.8  No. 18 - Print Centered Message - Blinking - ZCTRB
  1627.  
  1628.  
  1629.           See No. 17
  1630.  
  1631.      8.9  No. 19 - Print Centered Message - Underlined - ZCTRU
  1632.  
  1633.  
  1634.           See No. 17
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.      Monitor                           - 25 -        Computerenergy Corporation
  1654.  
  1655.                                       CHAPTER 9
  1656.  
  1657.                                    ERROR MESSAGES
  1658.  
  1659.  
  1660.      9.1  No. 20-26 - Error Messages - ZERRname
  1661.  
  1662.  
  1663.           ZERRname is a convenient way to display an error message response for
  1664.           either an entry that fails a test or an invalid entry type.  
  1665.  
  1666.           The responses provided  are: "Invalid", "Not Integer", "Not Numeric",
  1667.           "Function  =  nn  Not  Available  at  this  Point",  "ENTER-Only  Not
  1668.           Available at this Point", "Backup Entry Not Available at this Point",
  1669.           and "Help Not Available at this Point".  
  1670.  
  1671.           Where appropriate,  the  value  of the  failing variable is displayed
  1672.           with  the  error messages.   The message  will  appear just below the
  1673.           entry line, centered, and in reverse video.  Each message also pauses
  1674.           for approximately 1.5 seconds.  
  1675.  
  1676.           SET: 
  1677.  
  1678.                ZD$ = Item to be shown as in error.
  1679.                          Note: Use ZCTL% for Func. Key on msg 23
  1680.  
  1681.           FORMAT:
  1682.  
  1683.                Each error routine is  called with its own number  after placing
  1684.                the offending information in ZD$ if it is not already there.  
  1685.  
  1686.                     Z = No.   Error Message
  1687.                     -------   ----------------------------------
  1688.  
  1689.                       20      "Is Invalid"
  1690.                       21      "Is Not an Integer Number"
  1691.                       22      "Is Not Numeric"
  1692.                       23      "Function Key = nn Not Available at this Point"
  1693.                       24      "Field Backup Entry Not Available at this Point"
  1694.                       25      "ENTER-Only Entry Not Available at this Point"
  1695.                       26      "HELP Not Available at this Point"
  1696.  
  1697.                The Format in all cases is:
  1698.  
  1699.                     ZD$ = N$ : Z=nn : GOSUB 100
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.      Monitor                           - 26 -        Computerenergy Corporation
  1713.  
  1714.                                      CHAPTER 10
  1715.  
  1716.                       MONITOR LINE USAGE MAP/SPECIAL VARIABLES
  1717.  
  1718.  
  1719.  
  1720.      10.1  Monitor Line Number Usage Map
  1721.  
  1722.  
  1723.            Line No.   Description
  1724.            --------   --------------------------------------------------
  1725.  
  1726.            10         REMark for Program Title and Date
  1727.            15         Insert User Program Title for Display
  1728.            25         Change END if required for linking
  1729.            30         ZHELPSW% - 0=off, 1=on
  1730.            35         Setup
  1731.            40         Soft Key Disable
  1732.            45-70      Setup
  1733.            75         ZTFAC Timing Factor
  1734.            80         ZTMENU DIM's
  1735.            90         Display Box Title and GOTO 10000
  1736.            95 - 9999  Reserved for Monitor and other products
  1737.            10000      REM Enter User Program beginning here.
  1738.  
  1739.  
  1740.  
  1741.      10.2  Special Variables
  1742.  
  1743.  
  1744.            There are  several  special  variables that  are used within Monitor
  1745.            that may be of use to you.  
  1746.  
  1747.            Variable   Description
  1748.            --------   ---------------------------------------------------------
  1749.  
  1750.            ZDT$       Stores current normalized date
  1751.            ZENT$      Carriage Return or Enter Symbol
  1752.            ZTFAC      Timing delay loop counter (change for compiled code)
  1753.            ZTOF$      Printer Top of Form
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.      Monitor                           - 27 -        Computerenergy Corporation
  1772.  
  1773.                                      CHAPTER 11
  1774.  
  1775.                                  STANDALONE ROUTINES
  1776.  
  1777.  
  1778.      There are 2  standalone  routines  available  in  Monitor for  use  during
  1779.      program development.  If  memory space is a consideration,  these routines
  1780.      should be deleted from production or final versions of your programs.  
  1781.  
  1782.  
  1783.      11.1  Save Program Routine
  1784.  
  1785.           The Save Program  Routine will  save 2 copies of your  program with a
  1786.           simple GOSUB 9000  command.  A copy is saved  in encoded Basic format
  1787.           (.BAS extension)  and in  ASCII format (.S extension) for  use by the
  1788.           Expanding  Lister, CROSSREF,  Basic Compiler, etc.  To initialize the
  1789.           routine, enter your program name in the ZPROG$ variable at line 9010.
  1790.           Then,  to save  the copies  of your program, enter a  GOSUB 9000 from
  1791.           Basic's immediate or command mode.  
  1792.  
  1793.           If you forget to initialize the ZPROG$ variable with the name of your
  1794.           program, you  will simply save a copy of "PROGNAM.NAM" on your disk -
  1795.           no harm will be done.  
  1796.  
  1797.           However, BE AWARE,  that if  you are developing a series  of programs
  1798.           and  are  using a  copy of  Monitor from another program, the  ZPROG$
  1799.           variable may  contain the  wrong program name.  Should you  forget to
  1800.           change it,  and delete  the old program lines and  add new ones, when
  1801.           you GOSUB 9000, both copies of the original program will be destroyed
  1802.           by the new program which will be saved with the old program name.  BE
  1803.           CAREFUL!  This is an easy mistake to make (speaking from experience).
  1804.  
  1805.  
  1806.      11.2  Program Memory Map
  1807.  
  1808.           There is  a  standalone  routine that  will display memory statistics
  1809.           during  program  development.  It  is accessed  with  a GOSUB 9100 in
  1810.           immediate or command mode.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.      Monitor                           - 28 -        Computerenergy Corporation
  1831.  
  1832.                                      CHAPTER 12
  1833.  
  1834.                                   OTHER INFORMATION
  1835.  
  1836.      12.1  Distribution Disk Contents - Monitor
  1837.  
  1838.  
  1839.                File Name       Description
  1840.                ------------    --------------------------------------
  1841.  
  1842.                MONITOR.BAS     MONITOR source code
  1843.                MONITOR.DOC     Documentation
  1844.  
  1845.  
  1846.      12.2  Disclaimer
  1847.  
  1848.           All Computerenergy  computer  programs are  distributed on an "as is"
  1849.           basis without warranty.  
  1850.  
  1851.           Computerenergy Corporation  and/or  any of  its program authors shall
  1852.           have no liability  or responsibility to customer or  any other person
  1853.           or  entity with  respect to  any liability, loss or damage  caused or
  1854.           alleged to be  caused directly or indirectly by  programs distributed
  1855.           in  any  manner  by  Computerenergy  Corporation,  including  but not
  1856.           limited  to   any  interruption  of  service,  loss  of  business  or
  1857.           anticipatory profits  or consequential damages resulting from the use
  1858.           or operation of such computer programs.  
  1859.  
  1860.           Note: Good data  processing procedure dictates that the user test the
  1861.           program,  run  and test  sample sets  of data, and run the  system in
  1862.           parallel  with  the  system previously  in use  for  a period of time
  1863.           adequate to  insure that results of operation of the computer program
  1864.           are satisfactory.  
  1865.  
  1866.  
  1867.  
  1868.  
  1869.  
  1870.  
  1871.  
  1872.  
  1873.  
  1874.  
  1875.  
  1876.  
  1877.  
  1878.  
  1879.  
  1880.  
  1881.  
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.      Monitor                           - 29 -        Computerenergy Corporation
  1890.  
  1891.                                      CHAPTER 13
  1892.  
  1893.                        SUGGESTIONS, FEEDBACK, AND BUG REPORTS
  1894.  
  1895.           If you  can  spare the  time, we  would  appreciate your feedback and
  1896.           suggestions  to  help  us  to  improve  the  Monitor.   As  an  added
  1897.           inducement, we will also send a free Monitor (corrected) to the first
  1898.           person   reporting   each   bug.    Immediate   family   members   of
  1899.           Computerenergy employees are NOT eligible.  Valid bugs do not include
  1900.           obvious  architectual  limitations.   If possible,  each bug reported
  1901.           should include a  short-as-possible printout of the before  and after
  1902.           bug situation with explanatory notes.  Our unprejudiced judging panel
  1903.           will  make "Bug  Awards" when  the spirit moves them and,  of course,
  1904.           their decisions are final.  
  1905.  
  1906.           We are  also aware  of some  esthetic errors when operating with  the
  1907.           color  video  interface.   Those still  remaining should be corrected
  1908.           soon, but we'd still like to hear about any you find.  
  1909.  
  1910.           Please address correspondence  to the address on the title page.  (If
  1911.           you've lost your title page, just send us a note and we'll send you a
  1912.           new one.) 
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.      Monitor                           - 30 -        Computerenergy Corporation
  1949. 
  1950.  
  1951.  
  1952.  
  1953.  
  1954.  
  1955.  
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.      Monitor